/** 商品数据操作函数 */
import {
  GOODS_LIST
} from "./goodsType"

const initData = [
  { id: 4, name: "外星人", price: 14999 },
  { id: 3, name: "苹果", price: 12999 },
  { id: 2, name: "惠普", price: 6999 },
  { id: 1, name: "小米", price: 5899 },
]

function goodsReducer(state = initData, creator) {
  switch (creator.type) {
    case GOODS_LIST:
      console.log("列表查询数据")
      return state
    default:
      return state
  }
}

export default goodsReducer